package com.pai4j.remote.pgc.community;

import com.pai4j.common.bean.PAIResponseBean;
import com.pai4j.domain.community.vo.response.cc.CTCHomeDataVO;
import com.pai4j.domain.community.vo.response.cc.CTCPathBaseVO;
import com.pai4j.domain.community.vo.response.cc.CourseMenuVO;
import com.pai4j.domain.dto.resource.ResourceDTO;
import com.pai4j.domain.vo.response.UserBaseResponseInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * community Home (社区首页) Feign Client
 * 提供社区首页相关的远程调用接口
 *
 * @author: CYM-pai
 * @date: 2025/10/28
 **/
@FeignClient(name = "pai4j-pgc-service", contextId = "ctcHomeClient")
public interface CTCHomeClient {

    /**
     * 获取用户学习历史记录
     */
    @GetMapping("/pgc-service/api/cc/home/study/history")
    PAIResponseBean<List<ResourceDTO>> getStudyHistory(
            @RequestParam("userId") String userId,
            @RequestParam(value = "size", defaultValue = "10") Integer size);

    /**
     * 获取栏目菜单列表
     */
    @GetMapping("/pgc-service/api/cc/home/menus/{pathId}")
    PAIResponseBean<List<CourseMenuVO>> getMenus(@PathVariable("pathId") Long pathId);

    /**
     * 获取栏目首页详情数据
     */
    @GetMapping("/pgc-service/api/cc/home/detail/{pathId}")
    PAIResponseBean<CTCHomeDataVO> getHomeDetail(@PathVariable("pathId") Long pathId);

    /**
     * 获取活跃用户列表
     */
    @GetMapping("/pgc-service/api/cc/home/activityUsers")
    PAIResponseBean<List<UserBaseResponseInfoVO>> getActivityUsers();

    /**
     * 获取活跃栏目列表
     */
    @GetMapping("/pgc-service/api/cc/home/activityPaths")
    PAIResponseBean<List<CTCPathBaseVO>> getActivityPaths();

    /**
     * 判断用户是否关注
     */
    @GetMapping("/pgc-service/api/cc/home/isAttend")
    PAIResponseBean<Long> isAttend(@RequestParam("userId") String userId);
}

